count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

icount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

mcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

pcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ocount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

rcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

tcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

 count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

icount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ocount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

,count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

 count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

rcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ecount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)


count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)


count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

pcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

 count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

=count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

 count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

rcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

'count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

Ccount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

:count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

\count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

Ucount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

scount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ecount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

rcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

scount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

\count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

dcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ecount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ccount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

icount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

dcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

\count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

Dcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ocount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ccount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ucount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

mcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ecount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ncount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

tcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

scount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

\count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

pcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

rcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ocount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

jcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ecount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ccount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

tcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

scount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

\count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

scount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

pcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

tcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

-count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ccount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

lcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

acount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ucount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

dcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ecount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

-count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ccount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ocount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

dcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ecount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

\count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

tcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

rcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

acount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ccount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ecount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

acount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

bcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

lcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ecount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

-count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

rcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ecount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

qcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

scount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

.count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

tcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ocount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

mcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

lcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

'count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)


count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

scount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

 count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

=count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

 count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

icount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ocount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

.count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ocount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

pcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ecount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ncount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

(count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

pcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

,count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

 count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ecount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ncount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ccount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ocount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

dcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

icount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ncount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

gcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

=count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

'count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ucount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

tcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

fcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

-count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

8count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

'count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

)count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

.count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

rcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ecount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

acount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

dcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

(count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

)count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)


count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

Ncount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

Lcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

 count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

=count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

 count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ccount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

hcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

rcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

(count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

1count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

0count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

)count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)


count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

Qcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

 count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

=count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

 count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ccount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

hcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

rcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

(count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

3count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

4count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

)count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)


count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

Bcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

Scount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

 count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

=count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

 count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ccount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

hcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

rcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

(count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

9count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

2count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

)count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)


count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

Ecount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

Scount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

Ccount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

Qcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

 count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

=count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

 count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

Bcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

Scount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

 count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

+count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

 count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

Qcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)


count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)


count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

#count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

 count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

-count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

-count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

-count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

-count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

-count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

-count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

-count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

-count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

-count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

-count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

-count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

-count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

-count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

-count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

-count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

-count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

-count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

-count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

-count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

-count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

-count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

-count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

-count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

-count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

-count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

-count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

-count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

-count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

-count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

-count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

-count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

-count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

-count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

-count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

-count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

-count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

-count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

-count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

-count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

-count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

-count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

-count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

-count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

-count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

-count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

-count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

-count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

-count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

-count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

-count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

-count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

-count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

-count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

-count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

-count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

-count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

-count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

-count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

-count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

-count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

-count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

-count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

-count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

-count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

 count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ncount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ecount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

wcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

 count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

rcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ecount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

qcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ucount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

icount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

rcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ecount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

mcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ecount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ncount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

tcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

scount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)


count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)


count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ccount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ocount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

mcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

pcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

lcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

icount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

acount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ncount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ccount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ecount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

_count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

tcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

icount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

tcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

lcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ecount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

 count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

=count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

 count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

(count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)


count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

 count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

"count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ccount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

lcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

acount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ucount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

dcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ecount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

-count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

scount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

pcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

tcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

 count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

Dcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

Ecount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

Ccount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

Lcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

Acount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

Rcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

Ecount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

Scount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

 count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

`count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

[count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

icount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ocount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

]count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

 count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ccount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ocount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

mcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

pcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

lcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

icount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

acount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ncount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ccount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ecount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

 count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

=count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

 count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

tcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

rcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ucount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ecount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

`count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

 count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

acount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ncount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

dcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

 count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

Dcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

Ecount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

Lcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

Ecount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

Tcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

Ecount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

Scount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

 count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

icount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

tcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

scount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

 count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ocount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

wcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ncount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

 count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

`count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

@count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

<count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

.count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

.count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

.count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

@count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

>count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

`count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

 count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

pcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

acount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

rcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

scount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ecount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

rcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

 count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

icount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ncount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

 count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

tcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

hcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ecount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

 count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

Scount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

Acount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

Mcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

Ecount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

 count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

"count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)


count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

 count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

"count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

rcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ecount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

lcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ecount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

acount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

scount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ecount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

,count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

 count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

scount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ocount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

 count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

scount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

pcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

tcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

-count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ccount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ocount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

rcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ecount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

 count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

bcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ecount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ccount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ocount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

mcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ecount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

scount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

 count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

tcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

hcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ecount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

 count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

scount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

icount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ncount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

gcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

lcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ecount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

 count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

pcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

acount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

rcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

scount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ecount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

rcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

 count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ocount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

fcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

 count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

tcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

hcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

icount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

scount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

 count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

acount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

dcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

acount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

pcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

tcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ecount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

rcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

'count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

scount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

 count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

icount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ncount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

gcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ecount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

scount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

tcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

.count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

 count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

Tcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

hcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ecount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

 count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

pcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ucount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

bcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

lcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

icount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

scount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

hcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ecount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

dcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

 count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ocount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

rcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

dcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ecount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

rcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

icount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ncount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

gcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

 count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

"count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)


count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

 count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

"count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

rcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ucount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

lcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ecount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

 count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

icount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

scount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

 count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

tcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

hcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ecount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

 count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

wcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

hcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ocount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

lcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ecount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

 count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

dcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ecount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

scount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

icount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

gcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ncount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

:count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

 count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

'count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

acount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ncount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

 count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

acount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

dcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

acount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

pcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

tcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ecount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

rcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

 count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

tcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

hcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

acount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

tcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

 count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

scount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

hcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

icount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

pcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

scount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

 count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

icount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

tcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

scount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

 count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ocount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

wcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ncount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

 count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

tcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

acount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

gcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

 count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

pcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

acount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

rcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

scount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ecount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

rcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

 count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

tcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ocount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

dcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

acount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ycount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

 count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

kcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ecount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ecount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

pcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

scount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

 count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

bcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ecount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

icount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ncount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

gcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

 count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

tcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

hcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ecount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

 count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ocount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ncount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

lcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ycount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

 count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

"count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)


count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

 count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

"count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

pcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

acount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

rcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

scount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ecount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

rcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

 count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ucount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ncount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

tcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

icount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

lcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

 count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

icount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

tcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

scount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

 count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ocount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

wcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ncount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

 count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

rcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ecount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

lcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ecount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

acount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

scount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ecount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

 count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

dcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ecount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

lcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ecount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

tcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ecount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

scount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

 count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

tcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

hcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

acount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

tcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

 count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

pcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

acount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

rcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

scount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ecount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

rcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

 count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

acount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ncount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

dcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

 count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

dcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ecount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ccount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

lcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

acount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

rcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ecount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

scount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

 count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ccount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ocount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

mcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

pcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

lcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

icount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

acount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ncount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ccount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ecount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

 count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

icount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ncount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

 count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

tcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

hcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ecount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

 count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

scount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

acount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

mcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ecount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

 count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ccount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

hcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

acount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ncount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

gcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ecount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

 count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

-count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

 count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

scount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ocount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

 count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

"count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)


count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

 count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

"count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ncount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ocount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

 count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

vcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ecount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

rcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

scount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

icount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ocount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ncount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

 count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ecount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

xcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

icount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

scount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

tcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

scount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

 count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

icount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ncount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

 count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

wcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

hcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

icount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ccount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

hcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

 count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

bcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ocount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

tcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

hcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

 count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

pcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

acount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

rcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

scount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ecount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

 count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

tcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

hcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ecount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

 count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

scount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

acount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

mcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ecount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

 count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

tcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ecount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

xcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

tcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

 count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

acount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ncount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

dcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

 count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

scount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ecount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ncount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

dcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

 count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

icount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

tcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

 count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

tcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

wcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

icount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ccount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ecount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

.count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

 count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

Dcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ecount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ccount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

lcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

acount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

rcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ecount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

 count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ccount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ocount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

mcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

pcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

lcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

icount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

acount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ncount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ccount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ecount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

 count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

icount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ncount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

 count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

tcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

hcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ecount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

 count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

"count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)


count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

 count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

"count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

rcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ecount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

lcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ecount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

acount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

scount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ecount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

 count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

tcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

hcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

acount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

tcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

 count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

rcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ecount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

mcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ocount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

vcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ecount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

scount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

 count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ycount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ocount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ucount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

rcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

 count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

lcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ocount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ccount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

acount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

lcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

 count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

pcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

acount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

rcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

scount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ecount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

rcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

,count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

 count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ncount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ocount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

tcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

 count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

bcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ecount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

fcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ocount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

rcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ecount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

.count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

'count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

 count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

Wcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

Hcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

Acount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

Tcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

 count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

Ccount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

Ocount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

Rcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

Ecount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

 count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

Ncount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

Ocount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

Wcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

 count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

Pcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

Acount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

Rcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

Scount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

Ecount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

Scount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

:count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

 count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

tcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

hcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ecount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

 count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

pcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

acount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ycount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

lcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ocount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

acount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

dcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

scount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

 count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

tcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

hcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

icount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

scount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

 count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

"count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)


count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

 count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

"count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

acount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

dcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

acount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

pcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

tcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ecount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

rcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

 count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

rcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ecount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

pcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ocount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

rcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

tcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

scount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

 count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

acount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

tcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

 count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

icount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

tcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

scount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

 count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

icount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ncount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

gcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ecount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

scount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

tcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

 count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ecount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

dcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

gcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ecount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

scount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

 count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

-count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

 count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

Ucount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

Scount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

Ecount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

Rcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

_count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

Icount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

Ncount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

Pcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

Ucount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

Tcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

 count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ocount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ncount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

 count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

`count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

scount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

tcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

acount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

tcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ecount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

 count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

bcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ucount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

scount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ycount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

`count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

 count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

(count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

Rcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

Ecount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

Qcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

-count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

Icount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

Ocount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

-count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

Ucount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

Scount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

Ecount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

Rcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

-count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

Icount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

Ncount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

Pcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

Ucount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

Tcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

-count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

Pcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

Acount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

Ycount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

Lcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

Ocount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

Acount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

Dcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

)count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

,count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

 count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

tcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

hcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ecount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

 count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

"count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)


count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

 count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

"count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

tcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ucount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

rcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ncount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

'count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

scount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

 count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ccount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

lcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ocount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

scount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

icount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ncount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

gcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

 count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

Acount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

Gcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

Ecount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

Ncount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

Tcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

_count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

Ocount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

Ucount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

Tcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

Pcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

Ucount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

Tcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

 count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ocount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ncount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

 count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

`count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

scount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

tcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

acount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

tcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ecount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

 count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

icount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

dcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

lcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ecount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

`count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

 count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

(count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

Rcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

Ecount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

Qcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

-count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

Icount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

Ocount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

-count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

Acount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

Gcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

Ecount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

Ncount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

Tcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

-count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

Ocount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

Ucount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

Tcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

Pcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

Ucount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

Tcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

-count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

Pcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

Acount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

Ycount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

Lcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

Ocount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

Acount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

Dcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

)count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

,count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

 count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

acount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ncount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

dcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

 count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

tcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

hcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ecount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

 count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

Mcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

Icount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

Dcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

-count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

Tcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

Ucount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

Rcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

Ncount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

 count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

"count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)


count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

 count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

"count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

Acount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

Gcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

Ecount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

Ncount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

Tcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

_count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

Ocount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

Ucount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

Tcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

Pcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

Ucount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

Tcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

 count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

scount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

pcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

acount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ncount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

scount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

 count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

scount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

hcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

icount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

pcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

pcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ecount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

dcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

 count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

icount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ncount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

 count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

Rcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ecount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

lcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ecount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

acount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

scount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ecount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

 count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

Acount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

 count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

(count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

Rcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

Ecount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

Qcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

-count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

Icount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

Ocount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

-count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

Mcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

Icount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

Dcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

Tcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

Ucount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

Rcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

Ncount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

-count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

Scount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

Pcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

Acount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

Ncount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

-count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

Rcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

Ecount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

Pcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

Ocount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

Rcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

Tcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

)count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

.count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

 count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

Icount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

tcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

 count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ncount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ecount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

vcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ecount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

rcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

 count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

pcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

acount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

rcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

scount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ecount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

scount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

 count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

acount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

 count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

Rcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

Ecount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

Ccount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

Ecount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

Icount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

Vcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

Ecount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

Dcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

 count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

"count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)


count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

 count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

"count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

mcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ecount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

scount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

scount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

acount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

gcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ecount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

 count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

bcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ocount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

dcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ycount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

:count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

 count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

'count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

acount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

 count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

pcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ecount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ecount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

rcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

 count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ccount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

acount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ncount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

 count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

wcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

rcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

icount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

tcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ecount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

 count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

acount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

 count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

tcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

acount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

gcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

 count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

acount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

tcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

 count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ycount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ocount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ucount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

 count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

acount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

lcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

lcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

 count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

dcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

acount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ycount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

;count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

 count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

icount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

tcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

 count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

icount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

scount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

 count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

tcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ecount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

xcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

tcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

.count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

 count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

Ncount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ocount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

tcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

hcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

icount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ncount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

gcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

 count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ycount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ocount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ucount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

 count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

rcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ecount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ccount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ecount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

icount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

vcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ecount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

 count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ccount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

acount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ncount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

 count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

mcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

acount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

kcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ecount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

 count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ycount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ocount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ucount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

 count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

"count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)


count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

 count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

"count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

scount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ecount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ncount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

dcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

.count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

'count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

 count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

Rcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

Ecount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

Lcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

Ecount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

Acount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

Scount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

Ecount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

 count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

Acount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

 count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

Icount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

Scount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

 count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

Tcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

Hcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

Ecount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

 count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

Pcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

Rcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

Ecount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

Ccount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

Ocount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

Ncount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

Dcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

Icount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

Tcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

Icount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

Ocount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

Ncount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

,count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

 count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ncount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ocount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

tcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

 count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

acount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

 count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ccount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ocount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ncount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

vcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ecount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ncount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

icount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ecount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ncount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ccount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ecount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

.count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

 count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

Bcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ecount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

fcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ocount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

rcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ecount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

 count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

scount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

pcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

acount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ncount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

scount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

 count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ecount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

xcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

icount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

scount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

tcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ecount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

dcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

,count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

 count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

acount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

 count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

tcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

acount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

gcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

 count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

wcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

rcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

icount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

tcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

tcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ecount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ncount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

 count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

"count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)


count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

 count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

"count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

mcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

icount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

dcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

-count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

tcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ucount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

rcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ncount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

 count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

rcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ecount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

acount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ccount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

hcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ecount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

dcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

 count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ncount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ocount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

 count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

icount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ncount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

gcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ecount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

scount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

tcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

 count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ecount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

dcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

gcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ecount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

 count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

acount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

tcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

 count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

acount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

lcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

lcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

,count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

 count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

scount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ocount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

 count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

dcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ecount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ccount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

lcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

acount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

rcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

icount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ncount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

gcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

 count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ccount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ocount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

mcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

pcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

lcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

icount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

acount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ncount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ccount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ecount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

 count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

wcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ocount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ucount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

lcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

dcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

 count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

hcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

acount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

vcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ecount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

 count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

scount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

icount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

lcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ecount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ncount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

tcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

lcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ycount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

 count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

dcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

rcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ocount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

pcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

pcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ecount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

dcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

 count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

1count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

2count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

.count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

5count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

%count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

 count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

"count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)


count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

 count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

"count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ocount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

fcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

 count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

dcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

icount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

scount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

pcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

acount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

tcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ccount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

hcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ecount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

scount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

 count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

(count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

mcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ecount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

acount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

scount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ucount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

rcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ecount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

dcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

)count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

;count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

 count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

acount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ncount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

dcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

 count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

bcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ecount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

fcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ocount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

rcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ecount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

 count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

tcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

hcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ecount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

 count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

dcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

icount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

scount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

jcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ocount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

icount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ncount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

tcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ncount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ecount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

scount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

scount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

 count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

fcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

icount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

xcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

 count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

(count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

Rcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

Ecount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

Qcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

-count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

Hcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

Acount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

Zcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

Acount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

Rcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

Dcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

-count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

Icount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

Ocount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

-count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

Scount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

Pcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

Acount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

Ncount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

-count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

Ocount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

Vcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

Ecount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

Rcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

Lcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

Acount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

Pcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

)count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

 count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

acount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ncount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

 count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

"count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)


count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

 count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

"count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ocount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

vcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ecount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

rcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

lcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

acount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

pcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

pcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

icount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ncount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

gcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

 count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

pcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

acount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ycount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

lcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ocount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

acount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

dcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

 count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

wcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ocount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ucount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

lcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

dcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

 count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

hcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

acount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

vcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ecount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

 count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

rcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ecount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

-count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

dcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

icount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

scount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

pcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

acount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

tcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ccount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

hcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ecount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

dcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

 count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

acount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

 count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

tcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

acount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

gcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

 count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

tcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ocount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

 count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

tcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

acount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

rcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

gcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ecount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

tcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

scount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

 count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

tcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

hcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ecount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

 count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

acount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ucount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

tcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

hcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ocount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

rcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

 count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

acount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

dcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

dcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

rcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ecount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

scount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

scount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ecount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

dcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

 count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ocount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ncount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ccount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ecount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

.count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

 count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

Bcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ocount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

tcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

hcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

 count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

wcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ecount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

rcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ecount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

 count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

"count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)


count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

 count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

"count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

scount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

hcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

icount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

pcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

pcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ecount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

dcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

 count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

acount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ncount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

dcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

 count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

Fcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

Icount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

Ecount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

Lcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

Dcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

-count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

Vcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

Ecount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

Rcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

Icount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

Fcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

Icount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

Ecount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

Dcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

 count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

tcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

hcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

rcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ocount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ucount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

gcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

hcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

 count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

`count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

scount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

pcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

tcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

 count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

acount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

pcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

icount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

 count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

icount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ocount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

-count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ecount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

vcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ecount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ncount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

tcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

scount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

`count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

 count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

(count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

2count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

 count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

scount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

pcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

acount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ncount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

scount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

,count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

 count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

3count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

 count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ccount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

lcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ocount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

scount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ecount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

rcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

scount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

,count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

 count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

0count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

 count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

dcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ucount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

pcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

lcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

icount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ccount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

acount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

tcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ecount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

 count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

pcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

acount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ycount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

lcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ocount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

acount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

dcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

scount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

)count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

 count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

"count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)


count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

 count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

"count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

bcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ecount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

fcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ocount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

rcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ecount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

 count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

tcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

hcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

icount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

scount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

 count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

fcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

lcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

icount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

pcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

,count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

 count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

wcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

hcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

icount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ccount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

hcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

 count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

icount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

scount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

 count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ecount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

xcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

acount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ccount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

tcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

lcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ycount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

 count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

wcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

hcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

acount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

tcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

 count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

tcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

hcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ecount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

 count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

tcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

wcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ocount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

-count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

rcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ecount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

lcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ecount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

acount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

scount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ecount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

 count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

scount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

pcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

lcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

icount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

tcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

 count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

bcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ocount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ucount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

gcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

hcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

tcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

.count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

 count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

Wcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

Hcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

Acount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

Tcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

 count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

Icount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

Scount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

 count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

Dcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

Ecount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

Lcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

Ecount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

Tcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

Ecount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

Dcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

,count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

 count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

acount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ncount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

dcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

 count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

icount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

tcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

 count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

mcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ucount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

scount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

tcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

 count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

"count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)


count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

 count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

"count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

bcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ecount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

 count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

tcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

hcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ecount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

 count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

wcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

hcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ocount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

lcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ecount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

 count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

pcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

acount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

rcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

scount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ecount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

rcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

 count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

rcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

acount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

tcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

hcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ecount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

rcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

 count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

tcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

hcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

acount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ncount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

 count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

acount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

 count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ccount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ocount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ncount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

vcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ecount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ncount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

icount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ecount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ncount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

tcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

 count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

hcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

acount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

lcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

fcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

:count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

 count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

`count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

tcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

acount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

gcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

_count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

scount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ccount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

acount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ncount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

`count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

'count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

scount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

 count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

pcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ecount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ecount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

rcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

-count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

dcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

icount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

scount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

pcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

acount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

tcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ccount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

hcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

 count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

gcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

rcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

acount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

mcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

mcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

acount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

rcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

 count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

"count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)


count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

 count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

"count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

(count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

`count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

Tcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

acount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

gcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

Scount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ecount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ccount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

tcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

icount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ocount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ncount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

`count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

,count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

 count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

`count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

pcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

acount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

rcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

scount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ecount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

_count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

tcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

acount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

gcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

_count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

scount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ecount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ccount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

tcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

icount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ocount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ncount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

scount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

`count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

,count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

 count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

`count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

pcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ucount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

scount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

hcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

_count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

scount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ecount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ccount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

tcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

icount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ocount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ncount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

`count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

,count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

 count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

`count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ccount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ocount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

dcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ecount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

_count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

rcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

acount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ncount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

gcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ecount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

scount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

`count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

,count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

 count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

`count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

icount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ncount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

_count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ccount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ocount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

dcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ecount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

`count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

,count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

 count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

`count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

Dcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

icount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

scount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

pcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

acount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

tcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ccount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

hcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

.count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

scount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ecount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ncount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

dcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

scount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

`count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

)count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

 count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

"count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)


count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

 count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

"count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

acount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ncount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

dcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

,count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

 count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

icount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ncount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

 count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

`count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

hcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ocount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ocount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

kcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

.count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

rcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

scount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

`count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

,count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

 count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

tcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

hcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ecount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

 count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

`count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

scount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

pcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

tcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

 count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

scount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ecount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ncount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

dcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

`count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

 count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

fcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

acount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ncount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

-count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ocount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ucount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

tcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

,count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

 count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

tcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

hcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ecount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

 count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ocount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ucount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

tcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ccount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ocount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

mcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ecount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

 count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

tcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

acount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

lcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

lcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

icount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ecount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

scount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

 count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

acount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ncount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

dcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

 count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

tcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

hcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ecount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

icount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

rcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

 count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ccount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

lcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

acount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

scount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

scount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

icount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

fcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

icount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ccount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

acount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

tcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

icount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ocount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ncount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

scount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

,count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

 count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

tcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

hcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ecount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

 count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

"count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)


count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

 count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

"count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

scount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

tcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

acount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

mcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

pcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

 count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

pcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

rcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ocount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

bcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ecount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

,count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

 count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

tcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

hcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ecount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

 count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ocount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ucount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

tcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ccount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ocount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

mcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ecount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

 count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

lcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ecount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

dcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

gcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ecount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

rcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

,count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

 count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

tcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

hcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ecount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

 count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

Qcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

Ucount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

Ecount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

Ucount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

Ecount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

Dcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

 count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

tcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

rcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

icount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

pcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

wcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

icount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

rcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ecount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

,count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

 count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

acount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ncount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

dcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

 count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

tcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

hcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ecount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

 count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

wcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

hcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ocount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

lcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ecount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

 count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

scount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

hcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ocount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

rcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

tcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

fcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ocount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

rcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

mcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

-count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ccount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ocount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ncount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

fcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

icount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

rcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

mcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

 count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

scount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ucount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

rcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

fcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

acount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ccount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ecount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

 count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

"count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)


count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

 count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

"count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

(count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

`count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

Scount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ccount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

acount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ncount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

Ccount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ocount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ncount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

fcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

icount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

rcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

mcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

`count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

,count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

 count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

`count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

pcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

acount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

rcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

kcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

_count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

tcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ucount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

rcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ncount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

_count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ecount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ncount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

dcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

_count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ccount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ocount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ncount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

fcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

icount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

rcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

mcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

`count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

,count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

 count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

`count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

tcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

acount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

gcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

_count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ccount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ocount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ncount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

fcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

icount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

rcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

mcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

_count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

rcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ecount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

lcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

`count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

,count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

 count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

acount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ncount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

dcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

 count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

tcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

hcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ecount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

 count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

Ucount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

scount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ecount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

rcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

Pcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

rcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ocount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

mcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

pcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

tcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

Scount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ucount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

bcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

mcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

icount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

tcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

 count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

/count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

 count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

Pcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

rcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ecount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

Tcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ocount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ocount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

lcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

Ucount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

scount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ecount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

 count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

"count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)


count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

 count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

"count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

scount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

icount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

tcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ecount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

scount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

 count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

tcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

hcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

acount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

tcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

 count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

scount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ucount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

rcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

fcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

acount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ccount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ecount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

dcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

 count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

acount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

 count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

pcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

acount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

rcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

kcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ecount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

dcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

 count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ccount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ocount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ncount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

fcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

icount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

rcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

mcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

)count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

.count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

 count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

Acount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

 count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

Scount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

Pcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

Lcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

Icount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

Tcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

 count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

Pcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

Acount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

Rcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

Scount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

Ecount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

Rcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

 count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

Icount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

Scount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

 count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

Fcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

Ocount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

Rcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

Bcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

Icount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

Dcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

Dcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

Ecount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

Ncount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

 count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

-count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

 count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

kcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ecount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ecount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

pcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

icount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ncount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

gcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

 count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ocount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ucount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

rcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

scount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

 count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

fcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ocount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

rcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

 count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

acount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ncount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ycount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

 count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ccount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

acount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

scount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ecount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

 count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

"count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)


count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

 count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

"count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

rcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ecount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ocount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

pcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ecount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ncount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

scount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

 count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

tcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

hcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ecount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

 count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

dcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ocount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ucount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

bcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

lcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ecount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

-count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

scount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ecount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ncount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

dcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

 count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

wcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

icount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ncount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

dcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ocount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

wcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

 count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

tcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

hcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ecount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

 count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

gcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

acount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

tcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ecount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

 count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ecount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

xcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

icount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

scount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

tcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

scount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

 count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

tcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ocount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

 count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ccount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

lcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ocount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

scount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ecount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

.count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

 count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

Wcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

Hcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

Acount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

Tcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

 count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

Scount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

Ucount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

Rcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

Vcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

Icount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

Vcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

Ecount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

Scount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

,count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

 count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

dcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ecount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

lcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

icount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

bcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ecount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

rcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

acount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

tcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ecount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

lcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ycount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

:count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

 count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

tcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

hcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ecount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

 count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ccount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ocount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

mcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

mcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ucount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ncount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ecount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

 count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

"count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)


count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

 count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

"count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

scount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

hcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ocount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

rcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

tcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ccount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ucount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

tcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

 count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

(count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

`count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

>count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

>count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ccount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ocount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

mcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

mcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ucount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ncount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ecount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

<count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

<count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

`count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

,count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

 count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

Rcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

Ecount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

Qcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

-count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

Ccount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

Ocount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

Mcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

Mcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

Ucount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

Ncount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

Ecount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

-count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

Ocount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

Ucount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

Tcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

Pcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

Ucount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

Tcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

-count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

Scount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

Hcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

Ocount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

Rcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

Tcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

Ccount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

Ucount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

Tcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

)count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

 count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

icount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

scount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

 count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ocount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ucount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

rcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

scount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

 count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

acount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ncount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

dcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

 count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ccount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ocount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

rcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ecount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

 count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

kcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ncount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ocount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

wcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

scount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

 count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ncount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ocount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

tcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

hcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

icount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ncount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

gcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

 count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ocount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

fcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

 count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

icount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

tcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

;count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

 count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

tcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

hcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ecount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

 count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

"count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)


count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

 count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

"count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

tcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

rcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

acount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ncount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

scount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ccount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

rcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

icount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

pcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

tcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

 count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

pcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

rcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

icount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

mcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

icount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

tcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

icount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

vcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ecount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

scount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

 count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

`count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

acount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

scount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

scount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

icount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

scount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

tcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

acount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ncount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

tcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

_count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

tcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ecount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

xcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

tcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

scount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

_count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

fcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

rcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ocount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

mcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

_count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

jcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

scount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ocount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ncount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

lcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

`count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

 count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

acount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ncount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

dcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

 count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

`count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ccount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ocount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

mcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

pcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

lcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ecount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

tcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ecount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

_count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

lcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

icount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ncount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ecount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

_count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

pcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

rcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ecount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

fcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

icount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

xcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

`count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

,count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

 count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

wcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

hcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

icount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ccount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

hcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

 count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

tcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

hcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ecount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

 count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

icount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ocount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

 count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

pcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

acount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ycount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

lcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ocount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

acount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

dcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

 count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

"count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)


count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

 count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

"count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

lcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ecount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

gcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

scount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

 count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

dcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ecount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

pcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ecount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ncount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

dcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

 count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ocount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ncount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

;count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

 count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

tcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

hcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ecount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

 count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

bcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ycount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

tcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ecount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

 count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ccount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ucount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

rcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

scount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ocount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

rcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

 count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

acount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ncount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

dcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

 count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

icount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

tcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

scount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

 count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

fcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

icount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

rcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

scount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

tcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

-count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

rcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ucount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ncount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

 count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ncount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

acount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

rcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

rcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ocount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

wcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

icount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ncount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

gcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

 count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

"count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)


count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

 count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

"count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

(count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

Rcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

Ecount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

Qcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

-count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

Hcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

Acount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

Zcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

Acount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

Rcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

Dcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

-count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

Tcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

Acount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

Gcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

-count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

Fcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

Icount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

Rcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

Scount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

Tcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

-count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

Rcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

Ucount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

Ncount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

-count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

Dcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

Rcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

Ocount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

Pcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

)count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

;count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

 count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

acount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ncount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

dcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

 count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

tcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

hcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ecount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

 count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

Scount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

tcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ocount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

pcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

 count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

scount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ecount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

tcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

tcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

lcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ecount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

 count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

(count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

Rcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

Ecount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

Qcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

-count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

Hcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

Acount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

Zcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

Acount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

Rcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

Dcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

-count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

Tcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

Acount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

Gcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

-count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

Scount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

Tcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

Ocount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

Pcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

-count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

Scount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

Ccount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

Acount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

Ncount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

-count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

Ecount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

Acount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

Rcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

Lcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

Ycount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

)count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

,count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

 count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

wcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

hcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

icount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ccount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

hcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

 count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

"count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)


count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

 count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

"count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

Rcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ecount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

lcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ecount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

acount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

scount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ecount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

 count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

Acount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

 count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

rcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ecount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

pcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ocount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

icount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ncount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

tcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ecount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

dcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

 count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

acount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

tcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

 count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

tcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

hcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ecount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

 count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

pcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

acount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ycount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

lcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ocount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

acount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

dcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

 count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

rcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ecount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

acount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

dcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

.count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

 count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

`count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

scount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

hcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ocount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

rcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

tcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

fcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ocount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

rcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

mcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

 count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

=count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

 count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

fcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

acount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

lcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

scount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ecount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

`count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

 count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

Icount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

Scount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

 count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

Ncount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

Ocount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

Tcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

 count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

Dcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

Ecount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

Ccount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

Lcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

Acount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

Rcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

Ecount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

Dcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

:count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

 count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

icount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

tcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

 count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

icount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

scount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

 count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

tcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

hcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ecount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

 count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

"count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)


count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

 count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

"count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ecount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

xcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ocount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

tcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

icount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ccount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

-count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

hcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

acount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

rcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ncount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ecount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

scount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

scount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

 count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ocount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

pcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

tcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

-count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ocount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ucount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

tcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

,count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

 count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

acount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ncount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

dcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

 count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

dcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ecount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ccount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

lcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

acount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

rcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

icount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ncount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

gcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

 count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

icount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

tcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

 count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

wcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ocount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ucount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

lcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

dcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

 count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

tcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ucount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

rcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ncount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

 count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ccount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ocount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

rcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ecount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

'count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

scount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

 count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

rcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ecount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

acount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

dcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ecount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

rcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

 count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ocount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

fcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

fcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

,count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

 count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

wcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

hcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

icount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ccount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

hcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

 count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

wcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ocount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ucount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

lcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

dcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

 count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

lcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ecount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

acount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

vcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ecount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

 count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ncount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ocount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

 count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

pcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

acount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

rcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

scount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ecount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

rcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

 count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

"count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)


count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

 count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

"count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

acount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

tcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

 count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

acount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

lcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

lcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

 count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

rcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

acount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

tcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

hcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ecount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

rcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

 count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

tcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

hcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

acount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ncount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

 count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ocount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ncount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ecount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

.count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

 count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

Ocount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

Ucount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

Tcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

Ccount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

Ocount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

Mcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

Ecount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

Scount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

 count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

Mcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

Ocount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

Vcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

Ecount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

 count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

Tcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

Ocount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

 count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

Dcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

Icount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

Scount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

Pcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

Acount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

Tcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

Ccount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

Hcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

_count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

Rcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

Ecount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

Scount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

Ucount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

Lcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

Tcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

Scount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

,count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

 count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ccount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ocount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

rcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ecount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

'count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

scount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

 count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ncount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ocount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

wcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

-count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

scount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

icount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

gcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ncount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

acount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

lcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

 count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ccount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

acount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

tcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ecount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

gcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ocount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

rcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ycount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

,count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

 count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

wcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

hcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

icount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ccount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

hcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

 count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

icount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

scount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

 count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

"count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)


count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

 count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

"count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

dcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ocount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ccount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ucount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

mcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ecount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ncount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

tcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ecount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

dcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

 count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

acount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

scount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

 count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

'count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

tcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

hcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ecount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

 count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ocount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ncount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

lcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ycount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

 count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ccount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

hcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

acount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ncount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ncount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ecount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

lcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

,count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

 count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

bcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ycount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

 count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

dcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ecount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

scount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

icount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

gcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ncount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

 count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

-count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

 count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

acount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

 count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

dcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

icount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

scount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

pcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

acount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

tcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ccount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

hcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

 count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

dcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ocount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ecount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

scount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

 count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ncount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ocount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

tcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

 count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ecount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ccount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

hcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ocount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

 count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

icount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ncount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

tcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ocount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

 count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ycount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ocount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ucount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

rcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

 count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ocount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ucount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

tcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

pcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ucount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

tcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

,count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

 count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

dcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ocount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ecount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

scount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

 count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ncount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ocount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

tcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

 count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

"count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)


count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

 count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

"count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

rcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ecount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

pcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

lcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ycount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

 count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

tcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ocount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

 count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ycount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ocount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ucount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

,count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

 count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

acount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ncount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

dcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

 count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

dcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ocount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ecount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

scount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

 count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ncount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ocount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

tcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

 count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

pcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

rcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

icount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ncount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

tcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

 count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

acount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

 count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ccount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ocount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ncount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

fcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

icount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

rcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

mcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

acount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

tcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

icount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ocount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ncount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

 count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

lcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

icount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ncount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ecount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

,count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

 count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

bcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ecount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ccount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

acount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ucount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

scount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ecount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

 count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

acount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

 count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

scount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ecount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ccount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ocount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ncount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

dcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

 count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ccount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

hcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

acount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ncount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ncount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ecount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

lcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

 count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

icount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

scount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

 count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

hcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ocount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

wcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

 count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

acount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ncount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

 count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

acount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ucount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

tcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

hcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ocount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

rcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

 count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

"count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)


count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

 count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

"count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ecount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ncount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

dcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

scount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

 count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ucount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

pcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

 count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

tcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

rcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ucount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

scount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

tcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

icount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ncount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

gcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

 count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

wcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

hcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

icount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ccount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

hcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ecount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

vcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ecount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

rcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

 count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ocount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ncount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ecount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

 count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

tcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

hcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ecount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ycount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

 count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

hcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

acount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

pcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

pcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ecount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ncount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ecount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

dcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

 count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

tcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ocount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

 count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ncount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ocount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

tcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

icount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ccount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ecount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

.count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

'count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

 count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

Ocount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ucount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

rcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

 count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ocount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

wcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ncount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

 count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ccount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ocount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ncount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

fcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

icount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

rcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

mcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

 count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

scount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ucount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

rcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

fcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

acount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ccount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ecount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

 count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

wcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

acount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

scount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

 count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

rcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

icount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ccount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

hcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ecount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

rcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

,count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

 count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

acount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ncount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

dcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

 count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

"count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)


count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

 count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

"count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

icount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

tcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

 count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

icount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

scount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

 count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

rcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ecount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

tcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

icount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

rcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ecount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

dcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

 count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

rcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

acount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

tcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

hcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ecount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

rcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

 count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

tcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

hcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

acount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ncount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

 count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

kcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ecount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

pcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

tcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

 count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

bcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ecount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

scount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

icount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

dcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ecount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

 count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

icount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

tcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

 count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

fcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ocount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

rcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

 count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ecount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

xcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

acount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ccount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

tcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

lcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ycount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

 count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

tcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

hcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

acount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

tcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

 count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

scount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

tcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

acount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

tcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ecount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

dcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

 count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

rcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ecount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

acount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

scount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ocount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ncount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

.count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

"count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)


count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

)count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)


count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ccount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ocount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

mcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

pcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

lcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

icount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

acount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ncount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ccount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ecount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

_count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

scount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

tcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

acount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

gcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ecount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

scount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

 count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

=count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

 count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

(count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)


count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

 count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

'count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

rcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ecount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

qcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ucount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

icount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

rcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ecount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

dcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

_count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

scount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

tcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

acount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

gcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ecount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

scount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

 count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

=count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

 count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

[count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

"count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

icount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

mcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

pcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

lcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

"count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

,count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

 count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

"count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ucount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ncount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

icount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

tcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

"count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

]count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

 count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

 count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

#count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

 count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

Mcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

Icount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

Ncount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

Tcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

Ecount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

Dcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

 count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

+count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

 count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

Acount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

Ccount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

Tcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

Icount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

Vcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

Acount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

Tcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

Ecount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

Dcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

 count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

2count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

0count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

2count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

6count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

-count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

0count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

8count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

-count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

2count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

9count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

 count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

wcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

icount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

tcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

hcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

 count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

tcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

hcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ecount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

 count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

icount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

mcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

pcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

lcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ecount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

mcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ecount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ncount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

tcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

icount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ncount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

gcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

 count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ccount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ocount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

mcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

mcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

icount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

tcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

 count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

'count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)


count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

 count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

'count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

(count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

Rcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ecount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

lcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ecount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

acount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

scount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ecount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

 count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

Bcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

)count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

.count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

 count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

icount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

mcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

pcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

lcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

:count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

 count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

acount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

dcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

acount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

pcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

tcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ecount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

rcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

/count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ccount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

lcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

acount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ucount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

dcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ecount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

-count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

scount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

pcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

tcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

.count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

tcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ocount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

mcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

lcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

 count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

`count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

[count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

icount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ocount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

]count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

 count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ccount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ocount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

mcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

pcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

lcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

icount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

acount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ncount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ccount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ecount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

 count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

=count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

 count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

tcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

rcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ucount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ecount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

`count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

,count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

 count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

pcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

lcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ucount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

scount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

 count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

tcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

hcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ecount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

 count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

dcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ecount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

lcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ecount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

tcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

icount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ocount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ncount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

scount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

 count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

icount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ncount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

 count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

'count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)


count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

 count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

'count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

tcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ocount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ocount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

lcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

scount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

/count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ccount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

lcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

acount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ucount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

dcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ecount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

-count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

scount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

pcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

tcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

/count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

scount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

rcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ccount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

/count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

tcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

acount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

gcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

_count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

scount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ccount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

acount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ncount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

.count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

rcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

scount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

 count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

acount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ncount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

dcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

 count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

tcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ocount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ocount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

lcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

scount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

/count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ccount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

lcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

acount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ucount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

dcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ecount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

-count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

scount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

pcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

tcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

/count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

scount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

rcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ccount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

/count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

hcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ocount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ocount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

kcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

.count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

rcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

scount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

.count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

 count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ucount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ncount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

icount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

tcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

:count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

 count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

tcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

acount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

gcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

_count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

scount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ccount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

acount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ncount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

.count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

rcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

scount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

 count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

+count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

 count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

hcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ocount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ocount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

kcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

.count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

rcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

scount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

 count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

-count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

 count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

'count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)


count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

 count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

'count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

tcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

hcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ecount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

 count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

dcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

icount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

scount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

pcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

acount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

tcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ccount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

hcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

 count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

gcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

rcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

acount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

mcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

mcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

acount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

rcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

 count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

icount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

scount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

 count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

Gcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

Ocount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

Ncount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

Ecount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

 count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

(count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

acount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

 count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

`count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

@count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

<count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

.count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

.count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

.count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

@count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

>count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

`count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

 count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

icount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ncount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

 count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

acount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

gcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ecount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ncount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

tcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

 count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ocount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ucount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

tcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

pcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ucount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

tcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

 count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

pcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

rcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ocount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

dcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ucount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ccount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ecount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

scount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

 count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ncount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ocount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

 count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

`count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

scount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

pcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

tcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

 count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

scount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ecount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ncount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

dcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

`count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

 count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ccount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

acount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

lcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

lcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

 count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

acount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

tcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

 count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

acount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

lcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

lcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

,count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

 count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

'count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)


count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

 count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

'count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

acount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

scount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

scount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ecount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

rcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

tcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ecount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

dcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

 count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

rcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

acount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

tcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

hcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ecount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

rcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

 count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

tcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

hcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

acount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ncount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

 count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

acount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

scount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

scount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ucount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

mcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ecount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

dcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

,count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

 count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

scount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

icount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ncount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ccount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ecount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

 count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

acount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

 count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

scount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ucount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

rcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

vcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

icount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

vcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

icount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ncount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

gcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

 count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

pcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

acount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

rcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

scount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ecount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

rcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

 count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

icount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

scount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

 count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

tcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

hcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ecount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

 count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ocount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ncount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ecount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

 count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

fcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

acount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

icount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

lcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ucount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

rcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ecount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

 count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

tcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

hcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

icount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

scount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

 count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

rcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ecount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

qcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ucount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

icount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

rcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ecount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

mcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ecount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ncount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

tcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

 count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

'count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)


count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

 count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

'count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

fcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ocount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

rcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

bcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

icount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

dcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

scount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

)count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

;count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

 count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

acount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

 count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ccount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ocount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

mcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

mcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ucount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ncount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ecount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

 count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

bcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ocount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

dcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ycount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

 count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

scount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

tcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

icount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

lcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

lcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

 count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

rcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ocount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ucount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

tcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ecount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

scount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

 count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

tcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ocount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

 count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

tcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

hcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ecount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

 count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ccount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ocount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

mcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

mcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ucount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ncount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ecount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

 count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

fcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

icount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

lcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ecount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

;count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

 count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

tcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

hcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ecount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

 count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

bcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ycount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

tcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ecount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

 count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ccount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ucount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

rcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

scount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ocount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

rcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

 count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

scount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

tcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

icount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

lcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

lcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

 count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

acount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

dcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

vcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

acount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ncount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ccount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ecount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

scount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

.count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

 count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

Ncount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ocount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

 count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

'count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)


count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

 count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

'count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

"count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

icount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ncount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

tcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

"count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

:count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

 count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

tcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

hcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ecount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

 count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

pcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

acount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

rcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

scount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ecount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

 count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

acount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ncount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

dcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

 count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

tcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

hcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ecount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

 count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

dcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

icount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

scount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

pcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

acount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

tcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ccount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

hcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

 count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

acount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

rcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ecount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

 count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ccount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ocount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

rcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ecount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

-count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

scount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

icount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

dcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ecount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

 count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ocount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ncount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ccount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ecount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

 count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

dcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ecount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ccount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

lcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

acount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

rcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ecount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

dcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

.count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

'count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)


count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

)count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)


count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)


count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

qcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ucount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

icount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ecount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

tcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

_count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

tcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

icount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

tcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

lcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ecount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

 count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

=count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

 count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

(count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)


count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

 count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

"count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

Acount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

 count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

tcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ucount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

rcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ncount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

 count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

icount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ncount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

scount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

icount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

dcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ecount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

 count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

tcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

hcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ecount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

 count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

Acount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

Ccount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

Rcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

Ocount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

Scount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

Scount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

-count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

Ccount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

Lcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

Ecount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

Acount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

Rcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

 count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

Qcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

Ucount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

Icount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

Ecount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

Tcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

 count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

Wcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

Icount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

Ncount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

Dcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

Ocount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

Wcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

 count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

scount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

tcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

icount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

lcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

lcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

 count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

rcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ecount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

pcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ocount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

rcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

tcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

scount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

 count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

icount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

tcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

scount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

 count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

acount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ucount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

tcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

hcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ocount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

rcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ecount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

dcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

 count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

tcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ecount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

xcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

tcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

,count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

 count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

scount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ocount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

 count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

acount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

 count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

scount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

hcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ocount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

rcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

tcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

fcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ocount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

rcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

mcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

 count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

tcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

acount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

gcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

 count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

"count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)


count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

 count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

"count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

wcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

rcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

icount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

tcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

tcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ecount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ncount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

 count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

icount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ncount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

 count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

tcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

hcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

acount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

tcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

 count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

tcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ucount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

rcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ncount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

 count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

icount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

scount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

 count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

scount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

tcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

icount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

lcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

lcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

 count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

dcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

icount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

scount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

pcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

acount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

tcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ccount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

hcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ecount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

dcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

.count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

 count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

Tcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

Hcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

Ecount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

 count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

Icount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

Ncount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

Vcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

Acount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

Rcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

Icount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

Acount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

Ncount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

Tcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

 count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

Icount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

Scount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

 count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

Ocount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

Lcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

Dcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

Ecount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

Rcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

 count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

Tcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

Hcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

Acount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

Ncount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

 count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

Tcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

Hcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

Icount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

Scount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

 count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

Rcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

Ecount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

Lcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

Ecount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

Acount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

Scount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

Ecount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

 count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

acount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ncount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

dcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

 count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

wcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

acount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

scount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

 count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

scount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

tcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

acount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

tcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ecount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

dcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

 count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

"count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)


count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

 count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

"count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

acount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

tcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

 count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

tcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

hcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ecount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

 count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ccount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

acount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

lcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

lcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

 count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

scount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

icount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

tcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ecount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

 count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

icount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

tcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

 count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

icount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

scount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

 count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

acount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

bcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ocount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ucount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

tcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

 count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

tcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ocount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

 count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

bcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ecount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

 count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

bcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

rcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ocount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

kcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ecount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ncount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

 count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

acount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

tcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

:count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

 count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

'count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

Tcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

hcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ecount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

 count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

dcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

icount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

scount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

pcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

acount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

tcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ccount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

hcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

 count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

acount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

bcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ocount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

vcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ecount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

 count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

acount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

lcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

rcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ecount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

acount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

dcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ycount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

 count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

rcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

acount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ncount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

 count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

-count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

 count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ocount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ucount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

tcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

bcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ocount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ucount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ncount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

dcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

 count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

icount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

scount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

 count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ncount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ecount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

vcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ecount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

rcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

 count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

"count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)


count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

 count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

"count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

scount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ucount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

pcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

pcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

rcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ecount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

scount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

scount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ecount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

dcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

.count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

'count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

 count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

Ucount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ncount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

dcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ecount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

rcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

 count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ocount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ucount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

rcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

 count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ocount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

wcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ncount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

 count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

pcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

acount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

rcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

scount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ecount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

rcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

 count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

tcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

hcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

acount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

tcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

 count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

hcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ecount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

lcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

dcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

 count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

fcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ocount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

rcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

 count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

fcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

rcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ecount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ecount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

,count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

 count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

bcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ecount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ccount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

acount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ucount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

scount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ecount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

 count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

`count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

scount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ccount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

acount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ncount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

_count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

acount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ncount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

dcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

_count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

dcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

icount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

scount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

pcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

acount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

tcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ccount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

hcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

`count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

 count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

dcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

icount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

scount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

pcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

acount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

tcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ccount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

hcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ecount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

dcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

 count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

"count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)


count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

 count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

"count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

Bcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

Ecount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

Fcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

Ocount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

Rcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

Ecount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

 count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

`count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

hcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

acount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ncount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

dcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

lcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ecount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

_count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

scount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

tcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ocount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

pcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

`count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

 count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

rcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ecount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

acount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ccount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

hcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ecount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

dcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

 count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

tcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

hcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ecount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

 count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

qcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ucount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

icount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ecount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

tcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

-count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

wcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

icount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ncount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

dcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ocount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

wcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

 count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

rcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ecount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

tcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ucount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

rcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ncount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

.count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

 count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

Ucount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ncount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

dcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ecount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

rcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

 count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

`count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

[count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

icount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ocount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

]count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

 count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ccount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ocount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

mcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

pcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

lcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

icount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

acount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ncount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ccount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ecount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

`count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

 count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

tcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

hcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ecount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

 count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

dcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

icount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

scount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

pcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

acount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

tcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ccount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

hcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

 count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

icount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

scount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

 count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

"count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)


count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

 count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

"count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ccount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ocount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

rcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ecount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

'count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

scount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

,count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

 count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

acount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ncount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

dcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

 count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ccount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ocount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

rcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ecount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

 count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ocount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ncount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

lcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ycount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

 count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

scount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ecount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ecount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

scount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

 count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

wcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

hcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

acount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

tcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

 count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

wcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ecount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

 count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

Rcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

Ecount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

Pcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

Ocount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

Rcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

Tcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

 count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

-count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

 count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

scount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ocount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

 count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

tcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

hcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ecount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

 count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

qcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ucount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

icount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ecount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

tcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

 count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

wcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

icount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ncount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

dcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ocount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

wcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

,count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

 count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

wcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

hcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

icount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ccount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

hcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

 count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

rcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ecount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

tcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ucount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

rcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ncount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

scount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

 count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

bcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ecount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

fcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ocount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

rcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ecount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

 count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

tcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

hcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ecount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

 count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

icount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

dcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

lcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ecount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

 count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

"count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)


count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

 count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

"count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

pcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

acount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ycount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

lcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ocount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

acount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

dcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

 count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

rcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ecount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

pcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ocount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

rcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

tcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

 count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

acount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ncount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

dcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

 count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

scount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

kcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

icount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

pcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

scount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

 count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

tcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

hcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ecount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

 count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

Pcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

rcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ecount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

Tcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ocount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ocount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

lcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

Ucount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

scount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ecount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

 count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

scount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

pcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

acount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ncount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

 count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

lcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ecount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

gcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

,count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

 count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

wcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ocount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ucount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

lcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

dcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

 count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

scount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

icount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

lcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ecount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ncount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

tcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

lcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ycount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

 count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

scount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

tcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ocount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

pcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

 count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

dcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

icount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

scount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

pcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

acount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

tcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ccount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

hcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

icount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ncount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

gcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

 count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ecount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

vcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ecount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

rcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ycount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

 count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

tcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

acount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

gcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

 count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

icount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ncount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

 count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

"count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)


count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

 count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

"count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

tcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

hcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ecount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

 count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

tcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ucount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

rcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ncount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

 count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

tcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

hcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

acount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

tcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

 count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

acount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

rcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

mcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

scount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

 count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

acount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

 count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ccount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ocount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

mcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

mcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ucount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ncount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ecount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

-count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

acount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ccount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

rcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ocount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

scount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

scount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

.count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

 count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

Tcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

hcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

acount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

tcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

 count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

icount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

scount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

 count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

tcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

hcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ecount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

 count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

wcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ocount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

rcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

scount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

tcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

 count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

tcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ucount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

rcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ncount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

 count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

tcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ocount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

 count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

lcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ocount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

scount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ecount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

 count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ocount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ncount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ecount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

 count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ocount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ncount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

:count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

 count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

icount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

tcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

 count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

icount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

scount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

 count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

tcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

hcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ecount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

 count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

tcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ucount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

rcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ncount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

 count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

acount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ncount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

 count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

"count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)


count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

 count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

"count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

acount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

gcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ecount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ncount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

tcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

 count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

wcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

rcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

icount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

tcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ecount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

scount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

 count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

icount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

tcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

scount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

 count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

hcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

acount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ncount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

dcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ocount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

fcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

fcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

 count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

icount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ncount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

,count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

 count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

tcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

hcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ecount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

 count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

scount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ecount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

scount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

scount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

icount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ocount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ncount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

 count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

icount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

scount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

 count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

acount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

bcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ocount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ucount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

tcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

 count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

tcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ocount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

 count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

bcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ecount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

 count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

rcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ecount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

bcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ucount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

icount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

lcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

tcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

,count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

 count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

acount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ncount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

dcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

 count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ncount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ocount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

tcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

hcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

icount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ncount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

gcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

 count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

dcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ocount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

wcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ncount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

scount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

tcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

rcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ecount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

acount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

mcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

 count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

wcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ocount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ucount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

lcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

dcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

 count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

"count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)


count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

 count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

"count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

rcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ecount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ccount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ocount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

rcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

dcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

 count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

tcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

hcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

acount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

tcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

 count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

tcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

hcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ecount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

 count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

mcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ecount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

scount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

scount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

acount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

gcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ecount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

 count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

wcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

acount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

scount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

 count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ncount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ecount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

vcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ecount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

rcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

 count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

scount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ecount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ncount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

tcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

.count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

 count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

Tcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

Hcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

Ecount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

 count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

Fcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

Icount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

Xcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

 count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

Rcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

Icount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

Dcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

Ecount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

Scount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

 count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

Tcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

Hcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

Ecount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

 count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

Bcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

Ucount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

Scount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

Ycount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

 count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

Acount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

Rcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

Mcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

,count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

 count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

wcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

hcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

icount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ccount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

hcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

 count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

icount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

scount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

 count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

wcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

hcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

acount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

tcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

 count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

mcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

acount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

kcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ecount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

scount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

 count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

icount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

tcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

 count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

"count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)


count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

 count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

"count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ccount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ocount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

mcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

pcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

acount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

tcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

icount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

bcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

lcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ecount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

 count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

wcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

icount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

tcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

hcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

 count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

tcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

hcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ecount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

 count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

wcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

icount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ncount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

dcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ocount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

wcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

 count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

rcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

acount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

tcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

hcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ecount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

rcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

 count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

tcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

hcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

acount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ncount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

 count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

acount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

 count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

hcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ocount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

lcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ecount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

 count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

icount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ncount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

 count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

icount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

tcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

.count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

 count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

Tcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

hcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ecount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

 count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

qcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ucount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

icount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ecount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

tcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

 count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

wcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

icount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ncount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

dcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ocount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

wcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

 count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ecount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

xcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

icount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

scount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

tcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

scount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

 count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

tcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ocount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

 count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

kcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ecount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ecount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

pcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

 count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

tcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

hcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ecount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

 count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ecount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ncount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

dcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

pcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ocount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

icount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ncount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

tcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

 count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

"count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)


count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

 count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

"count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

Bcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

Ucount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

Scount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

Ycount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

 count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

acount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ccount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

rcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ocount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

scount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

scount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

 count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

tcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

hcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ecount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

 count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

`count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

/count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ccount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

lcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ecount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

acount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

rcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

`count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

 count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

bcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ocount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ucount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ncount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

dcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

acount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

rcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ycount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

 count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

scount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ocount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

 count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

icount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ncount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

bcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ocount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ucount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ncount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

dcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

 count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

scount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

pcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ocount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ocount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

lcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

scount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

 count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

fcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ocount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

rcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

 count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

tcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

hcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ecount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

 count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

pcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ocount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

scount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

tcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

-count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ccount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

lcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ecount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

acount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

rcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

 count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

scount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ecount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

scount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

scount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

icount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ocount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ncount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

,count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

 count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

acount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ncount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

dcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

 count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

mcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

acount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

rcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

kcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

icount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ncount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

gcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

 count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

Icount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

Dcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

Lcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

Ecount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

 count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

"count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)


count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

 count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

"count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

icount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

scount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

 count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

tcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

hcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ecount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

 count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

tcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

hcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

icount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ncount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

gcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

 count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

icount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

tcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

 count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

mcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ucount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

scount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

tcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

 count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ncount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ocount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

tcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

 count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

dcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ocount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

;count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

 count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

`count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

scount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

tcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

acount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

tcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ecount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

 count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

bcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ucount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

scount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ycount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

 count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

-count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

-count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

pcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

acount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ycount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

lcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ocount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

acount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

dcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

-count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

scount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

tcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

dcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

icount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ncount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

 count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

-count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

-count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

mcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

icount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

dcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

`count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

 count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

mcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

acount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

rcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

kcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

scount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

 count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

bcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ucount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

scount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ycount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

 count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

(count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

icount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

dcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ecount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

mcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

pcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ocount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

tcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ecount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ncount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

tcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

 count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

-count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

 count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

icount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

tcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

 count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

"count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)


count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

 count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

"count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

acount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

lcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

rcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ecount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

acount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

dcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ycount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

 count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

icount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

scount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

)count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

 count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

acount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ncount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

dcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

 count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

pcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ucount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

bcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

lcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

icount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

scount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

hcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ecount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

scount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

 count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

tcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

hcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ecount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

 count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

bcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

acount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

tcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ccount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

hcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

 count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

acount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

scount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

 count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

acount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

 count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

mcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

icount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

dcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

-count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

tcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ucount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

rcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ncount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

 count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

Acount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

Gcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

Ecount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

Ncount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

Tcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

_count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

Ocount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

Ucount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

Tcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

Pcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

Ucount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

Tcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

 count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

scount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

pcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

acount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ncount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

,count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

 count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

wcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

hcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

icount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ccount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

hcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

 count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ccount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ocount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

rcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ecount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

 count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

pcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

acount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

rcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

scount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ecount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

scount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

.count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

 count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

Scount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ocount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

 count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

tcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

hcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ecount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

 count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

"count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)


count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

 count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

"count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

tcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ecount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

xcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

tcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

 count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

rcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ecount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

acount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ccount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

hcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ecount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

scount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

 count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

tcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

hcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ecount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

 count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

pcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

acount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

rcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

scount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ecount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

rcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

,count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

 count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

tcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

hcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ecount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

 count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ecount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ncount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

dcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

pcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ocount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

icount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ncount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

tcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

 count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

scount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

tcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

acount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ycount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

scount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

 count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

Acount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

Ccount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

Tcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

Icount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

Vcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

Ecount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

,count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

 count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

acount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ncount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

dcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

 count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

tcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

hcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ecount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

 count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

wcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

icount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ncount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

dcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ocount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

wcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

 count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

kcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ecount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ecount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

pcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

scount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

 count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

dcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ocount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

icount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ncount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

gcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

 count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

icount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

tcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

scount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

 count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

jcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ocount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

bcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

.count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

 count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

Tcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

hcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ecount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

 count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

scount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

pcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

acount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ncount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

 count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

"count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)


count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

 count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

"count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

icount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

scount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

 count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

tcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

hcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ecount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

 count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

scount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

acount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

mcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ecount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

 count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ccount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ucount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

rcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

scount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ocount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

rcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

-count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

gcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ucount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

acount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

rcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

dcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ecount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

dcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

 count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

bcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

acount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

tcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ccount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

hcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

 count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ecount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

vcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ecount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

rcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ycount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

 count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ocount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

tcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

hcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ecount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

rcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

 count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

lcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ecount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

gcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

 count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

rcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ecount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

acount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

dcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

scount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

,count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

 count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

scount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ocount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

 count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ecount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

xcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

acount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ccount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

tcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

lcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ycount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

-count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ocount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ncount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ccount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ecount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

 count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

scount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

tcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

icount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

lcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

lcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

 count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

hcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ocount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

lcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

dcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

scount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

 count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

"count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)


count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

 count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

"count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

(count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

Rcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

Ecount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

Qcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

-count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

Hcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

Acount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

Zcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

Acount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

Rcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

Dcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

-count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

Icount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

Ocount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

-count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

Scount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

Pcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

Acount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

Ncount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

-count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

Ocount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

Vcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

Ecount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

Rcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

Lcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

Acount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

Pcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

)count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

.count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

 count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

Acount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

Ccount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

Ccount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

Ecount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

Pcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

Tcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

Ecount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

Dcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

 count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

Acount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

Ncount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

Dcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

 count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

Ncount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

Acount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

Mcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

Ecount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

Dcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

:count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

 count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

acount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

 count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

Bcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

Acount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

Rcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

Ecount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

 count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

(count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ocount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

dcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

dcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

,count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

 count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ucount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ncount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

pcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

acount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

icount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

rcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ecount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

dcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

)count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

 count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

`count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

;count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

;count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

`count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

 count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

scount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ecount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

acount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

lcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

 count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

mcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

acount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

rcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

kcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ecount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

rcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

 count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

icount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ncount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

 count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

tcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

hcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

acount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

tcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

 count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

"count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)


count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

 count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

"count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

tcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ucount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

rcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ncount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

 count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

icount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

scount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

 count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

rcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ecount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

fcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ucount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

scount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ecount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

dcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

 count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

acount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

scount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

 count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

Scount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

Ecount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

Acount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

Lcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

_count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

Bcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

Acount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

Rcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

Ecount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

_count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

Mcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

Icount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

Dcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

Tcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

Ucount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

Rcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

Ncount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

,count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

 count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

bcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ecount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ccount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

acount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ucount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

scount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ecount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

 count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

'count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

tcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

hcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

rcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ocount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ucount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

gcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

hcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

 count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

tcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

hcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ecount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

 count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ecount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ncount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

dcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

 count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ocount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

fcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

 count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ycount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ocount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ucount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

rcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

 count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ocount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ucount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

tcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

pcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ucount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

tcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

'count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

 count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ncount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

acount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

mcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ecount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

scount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

 count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

tcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ecount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

xcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

tcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

 count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ccount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ocount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

rcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ecount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

 count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

hcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

acount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

scount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

 count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

"count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)


count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

 count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

"count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ncount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ocount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

tcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

 count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

bcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ecount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ecount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ncount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

 count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

gcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

icount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

vcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ecount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ncount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

 count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ycount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ecount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

tcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

.count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

 count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

Scount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ecount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

acount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

lcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

 count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

Pcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

Acount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

Icount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

Rcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

Scount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

 count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

mcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

icount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ncount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

tcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

 count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ncount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ocount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

rcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

mcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

acount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

lcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

lcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ycount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

,count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

 count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

acount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ncount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

dcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

 count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

acount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

 count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

bcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

acount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

rcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ecount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

 count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

mcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

acount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

rcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

kcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ecount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

rcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

 count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

icount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

scount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

 count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

tcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

hcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ecount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

 count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ocount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ncount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ecount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

 count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ccount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ocount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ncount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

scount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

tcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

rcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ucount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ccount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

tcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

icount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ocount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ncount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

 count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

acount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ncount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

 count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

"count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)


count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

 count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

"count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

acount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ccount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

rcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ocount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

scount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

scount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

-count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ccount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

lcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ecount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

acount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

rcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

 count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

tcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ucount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

rcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ncount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

 count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

lcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ocount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

scount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ecount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

scount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

.count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

 count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

Rcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ecount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ccount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ocount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

rcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

dcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ecount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

dcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

 count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

rcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

acount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

tcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

hcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ecount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

rcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

 count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

tcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

hcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

acount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ncount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

 count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

wcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ocount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

rcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

kcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ecount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

dcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

 count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

acount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

rcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ocount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ucount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ncount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

dcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

:count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

 count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ccount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

lcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ocount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

scount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

icount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ncount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

gcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

 count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

tcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

hcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ecount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

 count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

pcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

acount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

icount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

rcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

 count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

icount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

scount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

 count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

tcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

hcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ecount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

 count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

acount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ucount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

tcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

hcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ocount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

rcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

'count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

scount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

 count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

fcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

icount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

xcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

,count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

 count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

"count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)


count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

 count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

"count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

acount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ncount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

dcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

 count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

acount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

 count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

scount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

hcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ocount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

rcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

tcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

 count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

scount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ecount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

acount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

lcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

 count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

tcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

hcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

acount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

tcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

 count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

lcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ocount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ocount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

kcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ecount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

dcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

 count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ccount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ocount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

rcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

rcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ecount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ccount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

tcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

 count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

wcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ocount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ucount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

lcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

dcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

 count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

bcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ecount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

 count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

wcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ocount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

rcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

scount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ecount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

 count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

tcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

hcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

acount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ncount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

 count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

acount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

 count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ncount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

acount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

mcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ecount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

dcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

 count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

rcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ecount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

fcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ucount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

scount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

acount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

lcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

.count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

"count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)


count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

)count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)


count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

qcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ucount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

icount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ecount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

tcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

_count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

scount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

tcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

acount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

gcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ecount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

scount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

 count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

=count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

 count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

(count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)


count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

 count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

'count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

rcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ecount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

qcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ucount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

icount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

rcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ecount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

dcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

_count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

scount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

tcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

acount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

gcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ecount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

scount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

 count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

=count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

 count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

[count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

"count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

dcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ocount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ccount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

"count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

,count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

 count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

"count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

icount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

mcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

pcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

lcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

"count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

,count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

 count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

"count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ucount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ncount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

icount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

tcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

"count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

]count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

 count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

 count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

#count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

 count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

Mcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

Icount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

Ncount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

Tcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

Ecount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

Dcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

 count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

+count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

 count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

Acount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

Ccount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

Tcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

Icount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

Vcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

Acount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

Tcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

Ecount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

Dcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

 count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

2count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

0count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

2count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

6count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

-count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

0count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

8count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

-count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

2count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

9count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

 count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

wcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

icount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

tcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

hcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

 count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

tcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

hcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ecount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

 count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

icount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

mcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

pcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

lcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ecount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

mcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ecount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ncount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

tcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

icount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ncount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

gcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

 count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

'count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)


count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

 count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

'count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ccount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ocount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

mcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

mcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

icount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

tcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

 count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

(count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

Rcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ecount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

lcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ecount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

acount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

scount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ecount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

 count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

Bcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

)count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

.count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

 count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

dcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ocount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ccount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

:count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

 count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

dcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ocount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ccount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

scount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

/count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

Kcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

Ncount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

Ocount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

Wcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

Ncount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

-count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

Hcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

Acount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

Zcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

Acount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

Rcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

Dcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

Scount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

.count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

mcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

dcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

.count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

 count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

icount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

mcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

pcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

lcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

:count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

 count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

tcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ocount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ocount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

lcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

scount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

/count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ccount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

lcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

acount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ucount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

dcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ecount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

-count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

scount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

pcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

tcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

/count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

scount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

rcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ccount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

/count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

hcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ocount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ocount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

kcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

.count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

rcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

scount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

 count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

-count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

 count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

tcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

hcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ecount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

 count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

qcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ucount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

icount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ecount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

tcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

-count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

'count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)


count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

 count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

'count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

wcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

icount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ncount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

dcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ocount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

wcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

 count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

acount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

rcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

mcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

 count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ocount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

fcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

 count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

hcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

acount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ncount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

dcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

lcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ecount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

_count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

scount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

tcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ocount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

pcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

 count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

rcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ecount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

pcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ocount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

rcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

tcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

scount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

 count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

tcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

hcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ecount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

 count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

bcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

acount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

tcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ccount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

hcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

 count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

acount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

scount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

 count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

acount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

 count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

`count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

-count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

-count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

mcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

icount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

dcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

`count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

 count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

scount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

pcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

acount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ncount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

 count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

bcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ecount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

fcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ocount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

rcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ecount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

 count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

rcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ecount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

tcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ucount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

rcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ncount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

icount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ncount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

gcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

.count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

 count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ucount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ncount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

icount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

tcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

:count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

 count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

hcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ocount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ocount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

kcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

.count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

rcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

scount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

 count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

-count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

 count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

acount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

 count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

'count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)


count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

 count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

'count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

Scount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

tcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ocount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

pcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

 count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

icount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ncount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

scount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

icount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

dcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ecount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

 count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

tcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

hcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ecount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

 count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

qcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ucount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

icount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ecount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

tcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

 count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

wcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

icount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ncount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

dcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ocount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

wcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

 count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

pcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ucount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

bcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

lcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

icount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

scount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

hcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ecount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

scount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

 count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

icount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

tcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

scount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

 count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

acount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ucount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

tcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

hcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ocount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

rcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ecount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

dcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

 count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

tcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ecount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

xcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

tcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

 count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

acount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

scount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

 count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

acount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

 count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

scount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

pcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

acount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ncount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

 count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

acount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ncount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

dcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

 count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

Ncount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

Ecount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

Vcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

Ecount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

Rcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

 count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

mcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

acount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

rcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

kcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

scount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

 count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

icount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

dcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

lcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ecount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

;count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

 count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

acount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

 count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

Scount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

tcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ocount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

pcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

 count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

'count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)


count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

 count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

'count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ocount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ucount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

tcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

scount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

icount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

dcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ecount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

 count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

tcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

hcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ecount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

 count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

wcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

icount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ncount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

dcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ocount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

wcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

 count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

icount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

scount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

 count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ucount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ncount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ccount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

hcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

acount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ncount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

gcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ecount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

dcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

;count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

 count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

acount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ncount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

 count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ecount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

mcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

pcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

tcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ycount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

 count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

bcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

acount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

tcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ccount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

hcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

 count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

icount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ncount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

 count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

tcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

hcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ecount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

 count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

wcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

icount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ncount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

dcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ocount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

wcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

 count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

rcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ecount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

pcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ocount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

rcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

tcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

scount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

 count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ncount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ocount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

tcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

hcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

icount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ncount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

gcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

 count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

acount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

tcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

 count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

acount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

lcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

lcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

.count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

'count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)


count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

)count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)


count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)


count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

bcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

lcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ocount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ccount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

kcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

 count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

=count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

 count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

(count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)


count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

 count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

 count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

 count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

 count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

Ncount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

Lcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

 count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

+count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

 count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

"count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

[count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

[count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

rcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ecount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

qcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ucount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

icount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

rcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ecount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

mcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ecount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ncount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

tcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

scount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

]count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

]count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

"count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

 count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

+count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

 count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

Ncount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

Lcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

 count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

+count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

 count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

'count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

icount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

dcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

 count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

=count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

 count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

"count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

Rcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

Ecount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

Qcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

-count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

Icount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

Ocount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

-count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

Ccount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

Ocount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

Mcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

Pcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

Lcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

Icount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

Acount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

Ncount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

Ccount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

Ecount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

-count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

Dcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

Ecount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

Ccount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

Lcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

Acount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

Rcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

Ecount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

Dcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

"count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

'count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

 count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

+count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

 count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

Ncount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

Lcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)


count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

 count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

 count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

 count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

 count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

+count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

 count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

'count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

tcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

icount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

tcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

lcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ecount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

 count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

=count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

 count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

"count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

'count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

 count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

+count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

 count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ccount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ocount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

mcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

pcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

lcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

icount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

acount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ncount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ccount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ecount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

_count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

tcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

icount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

tcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

lcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ecount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

 count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

+count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

 count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

'count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

"count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

'count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

 count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

+count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

 count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

Ncount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

Lcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

 count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

+count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

 count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ccount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ocount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

mcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

pcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

lcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

icount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

acount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ncount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ccount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ecount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

_count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

scount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

tcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

acount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

gcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ecount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

scount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

 count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

+count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

 count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

Ncount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

Lcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)


count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

 count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

 count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

 count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

 count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

+count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

 count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

Ncount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

Lcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

 count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

+count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

 count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

"count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

[count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

[count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

rcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ecount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

qcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ucount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

icount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

rcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ecount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

mcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ecount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ncount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

tcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

scount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

]count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

]count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

"count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

 count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

+count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

 count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

Ncount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

Lcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

 count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

+count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

 count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

'count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

icount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

dcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

 count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

=count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

 count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

"count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

Rcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

Ecount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

Qcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

-count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

Hcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

Acount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

Zcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

Acount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

Rcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

Dcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

-count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

Acount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

Ccount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

Rcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

Ocount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

Scount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

Scount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

-count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

Ccount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

Lcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

Ecount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

Acount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

Rcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

-count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

Dcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

Icount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

Scount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

Pcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

Acount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

Tcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

Ccount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

Hcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

-count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

Dcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

Rcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

Ocount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

Pcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

"count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

'count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

 count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

+count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

 count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

Ncount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

Lcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)


count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

 count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

 count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

 count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

 count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

+count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

 count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

'count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

tcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

icount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

tcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

lcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ecount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

 count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

=count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

 count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

"count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

'count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

 count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

+count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

 count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

qcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ucount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

icount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ecount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

tcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

_count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

tcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

icount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

tcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

lcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ecount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

 count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

+count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

 count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

'count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

"count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

'count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

 count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

+count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

 count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

Ncount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

Lcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

 count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

+count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

 count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

qcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ucount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

icount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ecount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

tcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

_count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

scount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

tcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

acount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

gcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ecount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

scount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

 count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

+count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

 count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

Ncount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

Lcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)


count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

)count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)


count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)


count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

fcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ocount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

rcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

 count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

tcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

 count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

icount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ncount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

 count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

(count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ccount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ocount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

mcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

pcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

lcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

icount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

acount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ncount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ccount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ecount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

_count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

tcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

icount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

tcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

lcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ecount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

,count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

 count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

qcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ucount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

icount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ecount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

tcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

_count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

tcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

icount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

tcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

lcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ecount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

)count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

:count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)


count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

 count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

 count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

 count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

 count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

acount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

scount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

scount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ecount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

rcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

tcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

 count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

Qcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

 count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ncount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ocount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

tcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

 count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

icount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ncount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

 count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

tcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

,count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

 count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

'count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

bcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

acount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

rcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ecount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

 count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

qcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ucount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ocount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

tcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ecount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

 count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

icount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ncount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

 count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

tcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

icount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

tcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

lcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ecount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

'count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)


count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

acount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

scount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

scount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ecount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

rcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

tcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

 count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

'count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

Rcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

Ecount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

Qcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

-count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

Icount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

Ocount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

-count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

Ccount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

Ocount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

Mcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

Pcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

Lcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

Icount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

Acount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

Ncount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

Ccount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

Ecount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

-count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

Dcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

Ecount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

Ccount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

Lcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

Acount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

Rcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

Ecount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

Dcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

'count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

 count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ncount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ocount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

tcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

 count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

icount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ncount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

 count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

scount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)


count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

acount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

scount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

scount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ecount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

rcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

tcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

 count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

'count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

Rcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

Ecount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

Qcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

-count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

Hcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

Acount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

Zcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

Acount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

Rcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

Dcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

-count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

Acount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

Ccount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

Rcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

Ocount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

Scount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

Scount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

-count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

Ccount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

Lcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

Ecount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

Acount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

Rcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

-count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

Dcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

Icount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

Scount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

Pcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

Acount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

Tcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

Ccount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

Hcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

-count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

Dcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

Rcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

Ocount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

Pcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

'count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

 count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ncount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ocount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

tcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

 count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

icount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ncount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

 count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

scount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)


count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

scount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

 count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

=count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

 count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

scount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

.count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

rcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

scount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

tcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

rcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

icount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

pcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

(count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

Ncount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

Lcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

)count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

 count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

+count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

 count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

Ncount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

Lcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

 count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

+count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

 count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

bcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

lcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ocount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ccount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

kcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)


count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)


count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

#count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

 count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

-count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

-count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

-count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

-count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

-count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

-count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

-count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

-count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

-count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

-count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

-count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

-count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

-count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

-count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

-count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

-count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

-count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

-count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

-count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

-count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

-count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

-count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

-count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

-count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

-count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

-count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

-count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

-count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

-count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

-count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

-count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

-count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

-count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

-count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

-count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

-count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

-count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

-count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

-count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

-count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

-count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

-count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

-count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

-count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

-count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

-count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

-count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

-count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

-count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

-count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

-count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

-count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

-count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

-count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

-count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

-count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

-count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

-count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

-count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

-count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

-count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

-count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

-count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

-count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

 count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

rcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ecount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

tcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

icount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

rcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ecount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

mcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ecount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ncount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

tcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

scount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)


count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)


count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

Rcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

Ecount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

Tcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

Icount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

Rcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

Ecount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

 count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

=count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

 count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

[count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)


count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

 count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

 count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

 count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

 count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

'count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

Rcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

Ecount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

Qcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

-count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

Tcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

Acount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

Gcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

-count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

Pcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

Ecount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

Ecount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

Rcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

-count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

Mcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

Ecount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

Scount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

Scount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

Acount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

Gcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

Icount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

Ncount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

Gcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

'count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

,count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)


count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

 count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

 count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

 count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

 count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

'count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

Rcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

Ecount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

Qcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

-count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

Tcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

Acount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

Gcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

-count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

Scount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

Ecount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

Ncount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

Dcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

-count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

Scount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

Tcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

Acount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

Mcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

Pcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

-count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

Ecount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

Xcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

Pcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

Lcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

Icount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

Ccount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

Icount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

Tcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

'count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

,count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)


count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

 count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

 count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

 count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

 count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

'count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

Rcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

Ecount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

Qcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

-count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

Tcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

Acount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

Gcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

-count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

Scount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

Ecount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

Ncount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

Dcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

-count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

Scount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

Tcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

Acount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

Mcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

Pcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

-count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

Pcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

Rcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

Ocount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

Bcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

Ecount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

'count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

,count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)


count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

 count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

 count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

 count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

 count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

'count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

Rcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

Ecount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

Qcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

-count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

Tcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

Acount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

Gcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

-count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

Scount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

Ecount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

Ncount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

Dcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

-count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

Fcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

Acount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

Icount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

Lcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

Ucount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

Rcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

Ecount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

-count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

Lcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

Ocount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

Ucount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

Dcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

'count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

,count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)


count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

 count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

 count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

 count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

 count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

'count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

Rcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

Ecount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

Qcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

-count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

Tcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

Acount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

Gcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

-count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

Scount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

Ecount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

Ncount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

Dcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

-count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

Qcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

Ucount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

Ecount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

Ucount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

Ecount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

Dcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

-count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

Vcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

Icount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

Scount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

Icount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

Bcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

Lcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

Ecount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

'count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

,count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)


count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

 count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

 count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

 count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

 count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

'count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

Rcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

Ecount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

Qcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

-count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

Tcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

Acount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

Gcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

-count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

Scount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

Ecount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

Ncount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

Dcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

-count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

Vcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

Ecount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

Rcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

Dcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

Icount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

Ccount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

Tcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

-count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

Ncount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

Ocount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

Tcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

-count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

Ccount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

Acount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

Tcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

Ccount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

Hcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

Acount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

Lcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

Lcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

'count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

,count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)


count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

 count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

 count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

 count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

 count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

'count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

Rcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

Ecount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

Qcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

-count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

Tcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

Acount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

Gcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

-count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

Scount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

Ecount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

Ncount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

Dcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

-count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

Pcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

Rcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

Ecount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

Tcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

Ocount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

Ocount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

Lcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

-count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

Tcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

Rcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

Acount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

Ccount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

Ecount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

'count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

,count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)


count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

 count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

 count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

 count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

 count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

'count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

Rcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

Ecount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

Qcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

-count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

Tcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

Acount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

Gcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

-count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

Scount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

Ecount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

Ncount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

Dcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

-count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

Ocount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

Ucount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

Tcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

Ccount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

Ocount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

Mcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

Ecount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

-count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

Lcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

Ecount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

Dcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

Gcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

Ecount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

Rcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

'count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

,count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)


count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

 count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

 count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

 count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

 count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

'count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

Rcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

Ecount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

Qcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

-count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

Tcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

Acount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

Gcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

-count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

Ccount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

Ocount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

Ncount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

Fcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

Icount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

Rcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

Mcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

-count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

Ncount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

Ecount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

Xcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

Tcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

-count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

Hcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

Ocount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

Ocount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

Kcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

'count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

,count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)


count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

 count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

 count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

 count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

 count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

'count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

Rcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

Ecount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

Qcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

-count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

Hcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

Acount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

Zcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

Acount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

Rcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

Dcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

-count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

Tcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

Acount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

Gcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

-count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

Bcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

Ocount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

Dcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

Ycount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

-count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

Ccount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

Ocount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

Dcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

Ecount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

-count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

Scount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

Pcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

Acount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

Ncount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

'count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

,count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)


count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

]count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)


count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)


count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

Pcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

Rcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

Ecount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

Fcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

Icount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

Xcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

 count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

=count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

 count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

(count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)


count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

 count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

"count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

Rcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

Ecount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

Tcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

Icount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

Rcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

Ecount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

Dcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

 count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

2count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

0count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

2count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

6count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

-count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

0count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

8count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

-count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

2count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

9count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

 count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

bcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ycount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

 count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

Rcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

Ecount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

Qcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

-count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

Icount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

Ocount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

-count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

Ccount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

Ocount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

Mcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

Pcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

Lcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

Icount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

Acount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

Ncount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

Ccount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

Ecount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

-count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

Dcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

Ecount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

Ccount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

Lcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

Acount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

Rcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

Ecount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

Dcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

 count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

(count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

Rcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ecount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

lcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ecount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

acount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

scount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ecount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

 count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

Bcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

)count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

:count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

 count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

tcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

hcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

icount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

scount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

 count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

acount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

dcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

acount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

pcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

tcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ecount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

rcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

 count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ncount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ocount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

 count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

lcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ocount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ncount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

gcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ecount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

rcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

 count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

pcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

acount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

rcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

scount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ecount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

scount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

 count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ocount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

rcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

 count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

"count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)


count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

 count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

"count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

dcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

icount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

scount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

pcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

acount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

tcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ccount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

hcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ecount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

scount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

 count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

scount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

hcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ocount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

rcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

tcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

fcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ocount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

rcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

mcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

 count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

-count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

 count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

scount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

pcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

tcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

-count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ccount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ocount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

rcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ecount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

 count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

dcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ocount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ecount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

scount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

,count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

 count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ocount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

fcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

fcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

 count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

tcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

hcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ecount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

 count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

icount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ncount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

gcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ecount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

scount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

tcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

 count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

pcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

acount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ycount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

lcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ocount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

acount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

dcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

scount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

 count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

wcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ecount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

 count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

rcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ecount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

pcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ocount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

rcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

tcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

,count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

 count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

acount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ncount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

dcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

 count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

pcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ecount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

rcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

-count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

tcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

acount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

rcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

gcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ecount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

tcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

 count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ocount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ucount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

tcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ccount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ocount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

mcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ecount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

scount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

 count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

"count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)


count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

 count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

"count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

scount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ucount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

rcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

fcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

acount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ccount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ecount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

 count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

tcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

hcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

rcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ocount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ucount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

gcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

hcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

 count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

tcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

hcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ecount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

 count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ncount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ocount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

wcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

-count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

scount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

icount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

gcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ncount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

acount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

lcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

 count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

Dcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

Icount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

Scount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

Pcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

Acount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

Tcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

Ccount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

Hcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

_count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

Rcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

Ecount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

Scount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

Ucount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

Lcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

Tcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

Scount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

 count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ccount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

acount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

tcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ecount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

gcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ocount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

rcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ycount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

,count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

 count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

wcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

hcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

icount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ccount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

hcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

 count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

icount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

scount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

 count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

dcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ocount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ccount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ucount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

mcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ecount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ncount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

tcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ecount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

dcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

 count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

acount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

scount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

 count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

tcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

hcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ecount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

 count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ocount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ncount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

lcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ycount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

 count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ccount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

hcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

acount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ncount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ncount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ecount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

lcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

 count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

"count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)


count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

 count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

"count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

bcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ycount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

 count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

dcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ecount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

scount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

icount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

gcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ncount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

.count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

 count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

Tcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

hcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ecount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

 count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ecount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

vcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

icount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

dcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ecount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ncount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ccount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ecount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

 count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

tcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

hcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

icount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

scount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

 count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

rcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ecount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

qcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ucount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

icount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

rcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ecount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

mcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ecount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ncount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

tcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

 count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

dcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ecount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

scount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ccount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

rcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

icount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

bcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ecount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

dcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

 count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

hcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

acount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

scount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

 count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

bcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ecount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ecount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ncount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

 count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

Dcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

Ecount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

Lcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

Ecount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

Tcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

Ecount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

Dcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

,count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

 count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ncount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ocount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

tcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

 count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

mcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ecount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

rcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ecount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

lcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ycount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

 count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

lcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ecount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

fcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

tcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

 count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ucount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ncount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

tcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

acount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

gcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

gcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ecount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

dcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

,count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

 count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

scount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ocount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

 count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

"count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)


count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

 count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

"count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

tcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

hcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ecount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

 count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

scount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

tcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

acount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

gcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ecount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

scount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

 count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

acount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

rcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ecount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

 count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ccount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

lcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ecount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

acount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

rcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ecount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

dcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

 count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

rcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

acount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

tcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

hcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ecount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

rcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

 count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

tcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

hcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

acount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ncount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

 count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

tcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

hcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ecount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

 count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

rcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ecount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

qcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ucount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

icount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

rcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ecount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

mcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ecount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ncount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

tcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

 count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

rcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ecount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

mcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ocount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

vcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ecount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

dcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

:count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

 count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

wcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

hcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

acount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

tcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

 count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

icount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

tcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

 count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

pcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

rcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ocount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

tcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ecount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ccount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

tcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ecount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

dcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

 count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

icount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

scount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

 count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

kcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ecount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

pcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

tcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

 count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

hcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ecount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

rcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ecount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

 count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

acount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

scount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

 count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

tcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

hcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ecount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

 count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

"count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)


count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

 count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

"count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

rcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ecount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

acount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

scount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ocount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ncount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

icount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ncount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

gcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

 count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

tcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

hcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

acount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

tcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

 count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

hcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

acount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

scount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

 count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

tcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ocount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

 count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

scount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ucount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

rcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

vcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

icount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

vcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ecount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

 count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

tcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

hcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ecount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

 count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ccount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ocount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

dcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ecount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

.count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

 count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

Ocount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

Rcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

Icount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

Gcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

Icount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

Ncount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

Acount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

Lcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

:count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

 count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

"count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)


count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

)count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)


count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)


count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ccount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ocount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ucount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ncount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

tcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

 count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

=count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

 count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

0count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)


count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

fcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ocount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

rcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

 count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

rcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

icount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

dcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

 count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

icount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ncount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

 count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

Rcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

Ecount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

Tcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

Icount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

Rcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

Ecount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

:count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)


count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

 count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

 count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

 count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

 count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

mcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

 count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

=count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

 count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

rcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ecount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

.count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

scount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ecount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

acount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

rcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ccount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

hcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

(count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

rcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

'count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

(count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

icount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

dcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

 count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

=count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

 count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

"count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

'count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

 count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

+count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

 count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

rcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

icount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

dcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

 count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

+count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

 count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

rcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

'count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

"count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

'count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

 count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

+count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

 count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

Ncount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

Lcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

 count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

+count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

 count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

rcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

'count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

tcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

icount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

tcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

lcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ecount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

 count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

=count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

 count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

"count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

)count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

'count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

,count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

 count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

scount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

)count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)


count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

 count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

 count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

 count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

 count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

acount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

scount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

scount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ecount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

rcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

tcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

 count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

mcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

,count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

 count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

'count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ncount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ocount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

tcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

 count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

fcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ocount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ucount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ncount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

dcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

:count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

 count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

'count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

 count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

+count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

 count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

rcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

icount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

dcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)


count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

 count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

 count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

 count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

 count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

scount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

 count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

=count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

 count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

scount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

[count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

:count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

mcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

.count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ecount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ncount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

dcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

(count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

)count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

]count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

 count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

+count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

 count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

Pcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

Rcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

Ecount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

Fcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

Icount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

Xcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

 count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

+count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

 count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

scount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

[count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

mcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

.count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ecount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ncount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

dcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

(count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

)count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

:count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

]count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)


count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

 count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

 count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

 count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

 count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

#count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

 count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ncount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ocount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

wcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

 count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ccount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

lcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ecount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

acount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

rcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

 count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

icount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

tcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

scount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

 count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

rcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ecount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

qcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ucount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

icount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

rcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ecount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

dcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

_count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

scount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

tcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

acount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

gcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ecount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

scount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

 count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

lcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

icount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ncount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ecount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

 count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

(count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

tcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

hcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ecount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

 count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

fcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

icount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

rcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

scount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

tcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

 count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ocount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ncount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ecount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

 count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

acount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

fcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

tcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ecount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

rcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

 count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

tcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

hcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

icount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

scount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

 count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

icount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

dcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

)count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)


count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

 count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

 count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

 count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

 count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

icount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

 count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

=count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

 count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

scount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

.count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

icount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ncount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

dcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ecount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

xcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

(count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

'count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

icount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

dcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

 count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

=count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

 count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

"count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

'count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

 count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

+count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

 count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

rcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

icount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

dcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

 count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

+count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

 count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

'count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

"count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

'count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

)count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)


count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

 count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

 count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

 count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

 count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

jcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

 count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

=count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

 count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

scount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

.count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

icount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ncount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

dcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ecount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

xcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

(count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

'count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

rcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ecount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

qcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ucount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

icount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

rcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ecount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

dcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

_count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

scount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

tcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

acount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

gcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ecount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

scount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

 count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

=count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

 count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

'count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

,count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

 count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

icount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

)count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)


count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

 count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

 count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

 count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

 count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

kcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

 count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

=count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

 count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

scount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

.count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

icount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ncount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

dcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ecount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

xcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

(count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

Ncount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

Lcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

,count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

 count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

jcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

)count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)


count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

 count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

 count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

 count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

 count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ocount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

lcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

dcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

 count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

=count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

 count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

scount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

[count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

jcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

:count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

kcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

]count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)


count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

 count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

 count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

 count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

 count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

scount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

 count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

=count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

 count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

scount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

[count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

:count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

jcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

]count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

 count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

+count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

 count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

'count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

rcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ecount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

qcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ucount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

icount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

rcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ecount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

dcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

_count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

scount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

tcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

acount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

gcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ecount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

scount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

 count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

=count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

 count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

[count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

]count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

 count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

 count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

#count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

 count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

Rcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

Ecount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

Tcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

Icount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

Rcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

Ecount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

Dcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

 count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

2count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

0count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

2count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

6count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

-count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

0count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

8count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

-count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

2count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

9count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

 count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

(count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

Rcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ecount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

lcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ecount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

acount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

scount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ecount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

 count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

Bcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

)count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

 count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

-count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

 count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ecount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

vcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

icount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

dcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ecount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ncount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ccount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ecount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

 count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

dcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ecount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

lcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ecount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

tcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ecount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

dcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

 count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

wcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

icount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

tcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

hcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

 count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

tcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

hcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ecount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

 count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

lcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ocount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ccount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

acount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

lcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

 count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

pcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

acount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

rcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

scount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ecount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

rcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

.count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

 count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

Wcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

Acount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

Scount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

:count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

 count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

'count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

 count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

+count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

 count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ocount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

lcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

dcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

[count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

lcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ecount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ncount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

(count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

'count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

rcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ecount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

qcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ucount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

icount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

rcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ecount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

dcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

_count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

scount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

tcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

acount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

gcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ecount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

scount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

 count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

=count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

 count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

'count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

)count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

:count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

]count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

 count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

+count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

 count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

scount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

[count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

kcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

:count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

]count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)


count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

 count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

 count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

 count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

 count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ccount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ocount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ucount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ncount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

tcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

 count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

+count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

=count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

 count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

1count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)


count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)


count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

icount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ocount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

.count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ocount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

pcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ecount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ncount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

(count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

pcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

,count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

 count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

'count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

wcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

'count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

,count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

 count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ecount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ncount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ccount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ocount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

dcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

icount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ncount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

gcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

=count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

'count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ucount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

tcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

fcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

-count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

8count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

'count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

,count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

 count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ncount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ecount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

wcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

lcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

icount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ncount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ecount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

=count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

Ncount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

Lcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

)count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

.count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

wcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

rcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

icount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

tcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ecount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

(count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

scount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

)count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)


count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

pcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

rcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

icount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ncount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

tcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

(count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

'count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

mcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

icount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ncount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

tcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ecount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

dcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

 count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

2count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

,count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

 count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

rcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ecount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

tcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

icount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

rcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ecount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

dcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

 count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

%count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

dcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

;count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

 count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

tcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ocount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

tcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

acount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

lcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

 count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

rcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ecount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

qcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ucount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

icount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

rcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ecount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

mcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ecount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ncount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

tcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

scount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

:count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

 count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

%count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

dcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

'count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

 count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

%count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

 count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

(count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ccount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ocount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ucount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ncount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

tcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

,count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

 count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

scount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

.count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ccount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ocount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ucount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ncount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

tcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

(count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

'count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

[count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

[count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

rcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ecount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

qcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ucount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

icount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

rcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ecount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

mcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ecount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

ncount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

tcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

scount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

]count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

]count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

'count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

 count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

+count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

 count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

Ncount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

Lcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

 count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

+count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

 count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

'count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

icount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

dcount = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

 count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

=count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

 count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

'count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

)count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

)count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

)count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)


count = 0
# BLOCK-AWARE, and that is not a style choice. A substring search for `id = "REQ-X"` matches a
# MENTION of that id inside another requirement's title -- these titles cross-reference each other
# constantly -- so an index-based edit silently rewrites the wrong requirement. It did exactly that
# on the first attempt: REQ-HAZARD-STOPFAILURE-STUCK-BUSY was handed another requirement's text.
blocks = s.split('[[requirements]]' + NL)
head, blocks = blocks[0], blocks[1:]
for bi, b in enumerate(blocks):
    first = b.split(NL, 1)[0]
    if not first.startswith('id = "'):
        continue
    rid = first[len('id = "'):-1]
    if rid not in RETIRE:
        continue
    lines = b.split(NL)
    # exactly one title line and one required_stages line, both at the top level of THIS block
    ti = next(i for i, l in enumerate(lines) if l.startswith('title = "'))
    si = next(i for i, l in enumerate(lines) if l.startswith('required_stages = '))
    lines[ti] = 'title = "' + PREFIX + lines[ti][len('title = "'):]
    was = lines[si][len('required_stages = '):]
    lines[si] = ('required_stages = []  # RETIRED 2026-08-29 (Release B) - evidence deleted with the '
                 'local parser. WAS: ' + was)
    blocks[bi] = NL.join(lines)
    count += 1
assert count == len(RETIRE), 'retired %d of %d' % (count, len(RETIRE))
s = head + ('[[requirements]]' + NL).join([''] + blocks)[len('[[requirements]]' + NL) - len('[[requirements]]' + NL):]
s = head + ''.join('[[requirements]]' + NL + b for b in blocks)

